{extend name="public/base" /}
{block name="title"}用户余额记录列表{/block}

{block name="content"}
<script language="javascript" type="text/javascript" src="<?php echo http_host(); ?>/js/My97DatePicker/WdatePicker.js"></script>
<h2 class="sub-header">用户余额记录列表 <small class="badge"><?php echo $list->total(); ?> 条</small></h2>

<form name="listarc" action="" method="get">
<div class="bg-info" style="margin:10px 0;padding:10px;">
    <div class="form-inline" style="display:inline;float:left;">
        <div class="form-group">
            <label for="order_sn">起止时间:</label>
            <input id="start_date" name="start_date" autocomplete="off" onclick="WdatePicker({el:this,dateFmt:'yyyy-MM-dd'})" size="10" type="text" class="form-control" placeholder="开始时间">
        </div>
        <div class="form-group">
            <label for="name">-</label>
            <input id="end_date" name="end_date" autocomplete="off" onclick="WdatePicker({el:this,dateFmt:'yyyy-MM-dd'})" size="10" type="text" class="form-control" placeholder="结束时间">
        </div>
        <button type="submit" class="btn btn-success">查询</button>
		
		<div class="form-group" style="margin-left:100px;"><input type="text" name="keyword" id="keyword" class="form-control required" placeholder="搜索关键词..."></div>
		<button type="submit" class="btn btn-info" value="Submit">搜索一下</button>
    </div>
    <div style="clear:both;"></div>
</div>

<div class="table-responsive"><table class="table table-striped table-hover">
<thead><tr class="info">
<th>ID</th>
<th>用户名</th>
<th>金额</th>
<th>说明</th>
<th>每次增减后面的金额</th>
<th>时间</th>
</tr></thead>
<tbody>
<?php if($list){foreach($list as $row){ ?><tr>
<td><?php echo $row['id']; ?></td>
<td><a href="<?php echo url('user_money/index').'?user_id='.$row['user_id']; ?>"><?php if($row['user']['user_name']){echo $row['user']['user_name'];}else{echo $row['user']['mobile'];} ?></a></td>
<td><font<?php if($row['type']==1){echo ' color="#0C0"';}else{echo ' color="red"';} ?>><?php if($row['type']==1){echo '-';} ?><?php echo $row['money']; ?></font></td>
<td><?php echo $row['desc']; ?></td>
<td><?php echo $row['user_money']; ?></td>
<td><?php echo date('Y-m-d H:i:s',$row['add_time']); ?></td>
</tr><?php }} ?>
</tbody></table></div><!-- 表格结束 --></form><!-- 表单结束 -->

<div class="backpages">{$page}</div>
{/block}